[IA64] different type of argument in vcpu_set_gr()
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Fri, 17 Feb 2006 21:57:19 +0000 (14:57 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Fri, 17 Feb 2006 21:57:19 +0000 (14:57 -0700)
Fix Reserved Register/Field fault in sal_emulate().
This bug is occurred by a wrong type argument.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
xen/arch/ia64/xen/vcpu.c
xen/include/asm-ia64/vcpu.h

index 4e56524dd9bd4543578c92f0eb43ac8ec09b5b9e..a15b09981a73bbb0513c3908f91f8f3d1dcce764 100644 (file)
@@ -81,7 +81,7 @@ unsigned long vcpu_verbose = 0;
 **************************************************************************/
 #ifdef XEN
 UINT64
-vcpu_get_gr(VCPU *vcpu, unsigned reg)
+vcpu_get_gr(VCPU *vcpu, unsigned long reg)
 {
        REGS *regs = vcpu_regs(vcpu);
        UINT64 val;
@@ -90,7 +90,7 @@ vcpu_get_gr(VCPU *vcpu, unsigned reg)
        return val;
 }
 IA64FAULT
-vcpu_get_gr_nat(VCPU *vcpu, unsigned reg, UINT64 *val)
+vcpu_get_gr_nat(VCPU *vcpu, unsigned long reg, UINT64 *val)
 {
        REGS *regs = vcpu_regs(vcpu);
     int nat;
@@ -104,7 +104,7 @@ vcpu_get_gr_nat(VCPU *vcpu, unsigned reg, UINT64 *val)
 //   IA64_ILLOP_FAULT if the register would cause an Illegal Operation fault
 //   IA64_NO_FAULT otherwise
 IA64FAULT
-vcpu_set_gr(VCPU *vcpu, unsigned reg, UINT64 value, int nat)
+vcpu_set_gr(VCPU *vcpu, unsigned long reg, UINT64 value, int nat)
 {
        REGS *regs = vcpu_regs(vcpu);
        if (!reg) return IA64_ILLOP_FAULT;
@@ -118,7 +118,7 @@ vcpu_set_gr(VCPU *vcpu, unsigned reg, UINT64 value, int nat)
 //   IA64_ILLOP_FAULT if the register would cause an Illegal Operation fault
 //   IA64_NO_FAULT otherwise
 IA64FAULT
-vcpu_set_gr(VCPU *vcpu, unsigned reg, UINT64 value)
+vcpu_set_gr(VCPU *vcpu, unsigned long reg, UINT64 value)
 {
        REGS *regs = vcpu_regs(vcpu);
        long sof = (regs->cr_ifs) & 0x7f;
index 812e91cae2e29f3fd0898abc27ab418aaf9d9c3c..18ec988891cf9a2008a4497fe97f2b99d0487ac2 100644 (file)
@@ -34,9 +34,9 @@ struct privop_addr_count {
 #endif
 
 /* general registers */
-extern UINT64 vcpu_get_gr(VCPU *vcpu, unsigned reg);
-extern IA64FAULT vcpu_get_gr_nat(VCPU *vcpu, unsigned reg, UINT64 *val);
-extern IA64FAULT vcpu_set_gr(VCPU *vcpu, unsigned reg, UINT64 value, int nat);
+extern UINT64 vcpu_get_gr(VCPU *vcpu, unsigned long reg);
+extern IA64FAULT vcpu_get_gr_nat(VCPU *vcpu, unsigned long reg, UINT64 *val);
+extern IA64FAULT vcpu_set_gr(VCPU *vcpu, unsigned long reg, UINT64 value, int nat);
 /* application registers */
 extern IA64FAULT vcpu_set_ar(VCPU *vcpu, UINT64 reg, UINT64 val);
 /* psr */